package com.atguigu.upp.utils;

import java.util.ResourceBundle;

/**
 * Created by Smexy on 2022/10/13
 */
public class PropertiesUtil
{

    //传入的是要读取的配置文件的名字，去掉后缀.
    //看做Map
    private static ResourceBundle resourceBundle = ResourceBundle.getBundle("config");

    public static String getProperty(String name){

      return resourceBundle.getString(name);

    }

    public static void main(String[] args) {

        System.out.println(PropertiesUtil.getProperty("updbname"));

    }
}
